Skip to content

show multiple parse errors if exist#687

Merged
aviatesk merged 1 commit intomasterfrom
avi/multi-parse-error
Feb 4, 2025
Merged

show multiple parse errors if exist#687
aviatesk merged 1 commit intomasterfrom
avi/multi-parse-error

Conversation

@aviatesk
Copy link
Owner

@aviatesk aviatesk commented Feb 4, 2025

multisyntaxerrors.jl

function f(W,X,Y)
    s = 0
    for i = 1:10
        s += g(W[i]*f(X[end-1] + Y[end÷2+]),
               W[i+1]*f(X[end-2] + Y[end÷2]) +,
               W[i+2]*f(X[end-3] + Y[end÷2-3]))
    end
    return s
end
julia> report_file("../JETLS/multisyntaxerrors.jl")
[...]
═════ 2 toplevel errors found ═════
┌ @ multisyntaxerrors.jl:4# Error @ multisyntaxerrors.jl:4:42for i = 1:10
│         s += g(W[i]*f(X[end-1] + Y[end÷2+]),
│ #                                        ╙ ── unexpected `]`
└──────────────────────
┌ @ multisyntaxerrors.jl:5# Error @ multisyntaxerrors.jl:5:47
│         s += g(W[i]*f(X[end-1] + Y[end÷2+]),
│                W[i+1]*f(X[end-2] + Y[end÷2]) +,
│ #                                             ╙ ── unexpected `,`
└──────────────────────

> multisyntaxerrors.jl
```julia
function f(W,X,Y)
    s = 0
    for i = 1:10
        s += g(W[i]*f(X[end-1] + Y[end÷2+]),
               W[i+1]*f(X[end-2] + Y[end÷2]) +,
               W[i+2]*f(X[end-3] + Y[end÷2-3]))
    end
    return s
end
```
```julia
julia> report_file("../JETLS/multisyntaxerrors.jl")
[...]
═════ 2 toplevel errors found ═════
┌ @ multisyntaxerrors.jl:4
│ # Error @ multisyntaxerrors.jl:4:42
│     for i = 1:10
│         s += g(W[i]*f(X[end-1] + Y[end÷2+]),
│ #                                        ╙ ── unexpected `]`
└──────────────────────
┌ @ multisyntaxerrors.jl:5
│ # Error @ multisyntaxerrors.jl:5:47
│         s += g(W[i]*f(X[end-1] + Y[end÷2+]),
│                W[i+1]*f(X[end-2] + Y[end÷2]) +,
│ #                                             ╙ ── unexpected `,`
└──────────────────────
```
@codecov
Copy link

codecov bot commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.45%. Comparing base (2d5a3cc) to head (78133da).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #687   +/-   ##
=======================================
  Coverage   90.44%   90.45%           
=======================================
  Files          14       14           
  Lines        3099     3101    +2     
=======================================
+ Hits         2803     2805    +2     
  Misses        296      296           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aviatesk aviatesk merged commit 14c204e into master Feb 4, 2025
11 of 14 checks passed
@aviatesk aviatesk deleted the avi/multi-parse-error branch February 4, 2025 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant